//
//  SSAdvertCell.m
//  starspaceVR
//
//  Created by 曹端芹 on 17/9/12.
//  Copyright © 2017年 starspace. All rights reserved.
//

#import "SSAdvertCell.h"

@interface SSAdvertCell () <SDCycleScrollViewDelegate>

@end

@implementation SSAdvertCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor orangeColor];
        
        
    }
    return self;
}

- (void)setImageNameArr:(NSArray *)imageNameArr {
    _imageNameArr = imageNameArr;
    SDCycleScrollView *cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:self.bounds imageNamesGroup:imageNameArr];
    cycleScrollView.delegate = self;
    [self addSubview:cycleScrollView];
}

- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index {
    if (self.clickBlock) {
        self.clickBlock(index);
    }

}


@end
